﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DIPLib.UI
{
    public partial class FilterSettingDialog : Form
    {
        byte mMatrixSize;
        byte mEdgeApproach;
        public byte MaTrixSize
        {
            get
            {
                return mMatrixSize;
            }
        }
        public byte EdgeApproach
        {
            get
            {
                return mEdgeApproach;
            }
        }

        public FilterSettingDialog()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (cbxMatrixSize.SelectedIndex == 0)
            {
                mMatrixSize = 3;
            }
            else if (cbxMatrixSize.SelectedIndex == 1)
            {
                mMatrixSize = 5;
            }
            else if (cbxMatrixSize.SelectedIndex == 2)
            {
                mMatrixSize = 9;
            }
            else if (cbxMatrixSize.SelectedIndex == 3)
            {
                mMatrixSize = 15;
            }
            else if (cbxMatrixSize.SelectedIndex == 4)
            {
                mMatrixSize = 35;
            }
            mEdgeApproach = (byte)(cbxEdgeMode.SelectedIndex + 1);

            Dispose();
        }
    }
}
